home *** CD-ROM | disk | FTP | other *** search
- # same test as prog23, using resource instead of callback info
- xtAppInitialize -class Program
-
- xmList .list managed -items "red, green, blue" -itemCount 3
- .list addItem pink 1
- .list setValues -selectionPolicy multiple_select
- .list multipleSelectionCallback put_selected
-
- proc put_selected {} {
-
- # .list getValues -selectedItemCount size
- # set XmStringTableSize $size
- .list getValues -selectedItems selected
- puts stdout "selected: $selected"
- }
-
- . realizeWidget
-
- . mainLoop
-